<!DOCTYPE html>

<html lang="zh-hans">
<head>
    <title>使用爬虫</title>
    <link rel="stylesheet" type="text/css" href="/static/admin/css/base.css">
    <link rel="stylesheet" type="text/css" href="/static/admin/css/dashboard.css">


    <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0">
    <link rel="stylesheet" type="text/css" href="/static/admin/css/responsive.css">


    <meta name="robots" content="NONE,NOARCHIVE">
</head>


<body class=" dashboard"
      data-admin-utc-offset="28800">

<!-- Container -->
<div id="container">


    <!-- Header -->
    <div id="header">
        <div id="branding">

            <h1 id="site-name"><a href="/admin/">使用爬虫</a></h1>

        </div>


        <div id="user-tools">

            欢迎，
            <strong>{{ username }}</strong>

            <a href="{% url "users" %}">个人中心</a> /

            <a href="/off">注销</a>

        </div>


    </div>
    <!-- END Header -->


    <!-- Content -->
    <div id="content" class="colMS">

        <h1>查看和使用爬虫</h1>

        <div id="content-main">


            <div class="app-auth module">
                <table>
                    <caption>
                        <a href="#" class="section" title="爬虫列表">爬虫列表</a>
                    </caption>

                    {% for sp in spider %}
                        <tr class="model-user">
                            <th scope="row"><a
                                    href="/add?name={{ sp.name }}&id={{ sp.id }}&t={{ sp.hear }}">{{ sp.name }}</a></th>
                            <td>
                                {% if sp.hear == 0 %}
                                    热度爬虫
                                {% elif sp.hear == 1 %}
                                    关键字爬虫
                                {% elif sp.hear == 2 %}
                                    单单网
                                {% elif sp.hear == 3 %}
                                    中国新闻
                                {% else %}
                                    类型错误
                                {% endif %}
                            </td>
                        </tr>
                    {% endfor %}


                </table>
            </div>


        </div>


        <div id="content-related">
            <div class="module" id="recent-actions-module">
                <h2>我的使用记录</h2>
                <h3>我的爬虫记录</h3>


                <ul class="actionlist">
                    {% load index_dic %}

                    {% for gro in group %}
                        <li class="changelink">
                            <a href="{% url "search" %}?name={{ gro|dic_name }}">{{ gro|dic_name }}</a>
                            <br>
                            <span class="mini quiet">一共一{{ gro|dic_c }}条数据</span>
                        </li>
                    {% endfor %}


                </ul>

            </div>
        </div>

        <br class="clear">
    </div>
    <!-- END Content -->

    <div id="footer"></div>
</div>
<!-- END Container -->

</body>
</html>
